{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style>
    .col-md-4{
        padding: 0 0 0 15px;
        margin: 10px 0;
    }
    .table{
        margin-bottom: unset;
    }
</style>
<body class="col-md-12">
                    <div class="fixed-table-toolbar">
                        <form method="get" action="" style="display: flex;">
                            <div class="pull-left search" style="display: flex;">
                                <input name="time" type="text" id="time" class="form-control layui-input" value="{present name='time'}{$time}{/present}" placeholder="时间" autocomplete="off" style="height:34px;width:180px;margin:0 10px;">
                                    <button style="border-radius:0px; border:1px solid #e5e6e7;"
                                            class="btn btn-default btn-outline" type="submit" id="search-btn">查询
                                    </button>
                            </div>
                        </form>
                    </div>
<div class="row">
  <div class="col-md-5" style="max-height: 635px;overflow-y: auto;">
    <table class="table table-hover table-bordered table-striped">
      <tr style="position: sticky;top: 0;">
        <th width="100">统计日期</th>
        <th>总数量</th>
        <th>已封号</th>
        <th>离线</th>
        <th>在线</th>
      </tr>
        {volist name="data" id="v"}
      <tr>
        <td>{$key}</td>
        <td>{$v.total}
        </td>
        <td>{$v.banned_count}
            {if condition="$v['banned']"}
            <span onclick="showUids('{$v['banned']}','{$key}')">查看</span>
            {/if}
        </td>
        <td>{$v.unline_count}
            {if condition="$v['unline']"}
            <span onclick="showUids('{$v['unline']}','{$key}')">查看</span>
            {/if}
        </td>
        <td>{$v.online_count}
            {if condition="$v['online']"}
            <span onclick="showUids('{$v['online']}','{$key}')">查看</span>
            {/if}
        </td>
      </tr>
        {/volist}
    </table>
  </div>
</div>
    

</body>
{include file="public/footer" /}
<script type="text/javascript">

    layui.use(['laydate'], function(){
        var laydate = layui.laydate;

        laydate.render({
            elem: '#time' //指定元素
            ,type: 'date'
            ,trigger: 'click'
        });
    })

    function chat(ids)
    {
        layui.use('layer', function(){
            var layer = layui.layer;
            layer.open({
                title :'预览',
                area: ['100%', '100%'],
                type: 2,
                content: '{:url("usertalk/grouprecords")}?search=id&name='+ids
            });
        });
    }

    function showUids(uids,date) {
        layui.use('layer', function(){
            var layer = layui.layer;
            layer.open({
                title :'预览',
                area: ['100%', '100%'],
                type: 2,
                content: '{:url("unreplyList")}?touids='+`${uids}&date=${date}`
            });
        });
    }
</script>